[Top] [Prev] [Next] [Bottom] [Contents]

SaSetDefaultUser

Sets the user name that a Sapphire/Web-generated CGI executable will use when logging into a database server.

Synopsis

#include "WorkingDialog.h"
int SaSetDefaultUser(char* user);

Arguments

user
User Name in order to log into the database server via the Sapphire/Web-generated CGI.

Return Values

Returns 0.

Description

Sets the user name that a Sapphire/Web-generated server application executable will use when logging into a database server. The default value can be set multiple times during the execution of a CGI. However, the new value will have no effect for any database server that already has a valid login. Usually, you would only use a hard-coded value for a restricted user and that user's password in this function call.

If the operation requires the remote user's identity, use a Form with an input element for user name and a password element for the password. Use the user name input value as the argument to this call. This value is used if embedded SQL is allowed (See Also).

It is highly recommended that the default user for this path through the server application be a restricted user when allowing embedded SQL.

Recommended format:

SaSetDefaultUser("guestaccount");
The following embedded SQL would potentially be dangerous if the default user had delete privileges.

Not recommended:
##Sa_SQL=delete from authors##
Note: This call is generated automatically by Sapphire/Web in the cgi Main C file, with the dirname being the value of the "Database User Name" project option.

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.